<div id="mws-container" class="clearfix">
  <div class="container">
    <div class="mws-panel grid_8">
      <div class="mws-panel-header"> <span class="mws-i-24 i-table-1">Attributes Group - Management</span> 
          <span class="linktop">
			  <?php echo $html->link('Add Attribute Group', array('controller'=>'Setups', 'action'=>'add_attr_group'))?>
          </span>
      </div>
      <div class="mws-panel-body">
        <div class="dataTables_wrapper">
          <table class="mws-datatable-fn mws-table">
            <thead>
              <tr>
                <th class="sorting_asc" rowspan="1" colspan="1" style="width: 141px;">Name</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 239px;"> Sort Order</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 239px;">Category</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 150px;">Status</th>
                <th class="sorting" rowspan="1" colspan="1" style="width: 91px;">Actions</th>
              </tr>
            </thead>
            <?php if(isset($attrGroups) and ($attrGroups)): ?>
            <tbody>
            <?php  $x =0;
			
			foreach($attrGroups as $attrGroup){
				
				//pr($attrGroup);
				//exit;
				if($x%2==0)
				{
					$class ="odd";
				}
				else
				{
					$class ="even"; 
				}
				?>
              <tr class="gradeA <?php echo $class ; ?>">
                <td class=" sorting_1"><?php echo $attrGroup['AttrGroup']['name']; ?></td>
                <td><?php echo $attrGroup['AttrGroup']['sort']; ?></td>
                 <td><?php echo $attrGroup['AttrGroup']['Category']; ?></td>
                <td class="center">
					<?php
                     if(isset($attrGroup['AttrGroup']['status']) and ($attrGroup['AttrGroup']['status']==1))
                     {echo "Active";}else{ echo "Deactive";} ?>
                 </td>
                <td class="center">
						<?php 
                            echo $html->link("Edit", 
                            array('action'=>'add_attr_group',"AttrGroup", 
                            base64_encode($attrGroup['AttrGroup']['id'])), array('escape'=>false));  
                        ?>
                            <?php
                                 echo $html->link('Delete',
                                 array('controller'=>'Setups', 'action' => 'admin_delete_by_id',
                                'AttrGroup',$attrGroup['AttrGroup']['id'],'admin_attribute_groups'), array('escape' => false,'id'=>'alink'), 'Are you sure?');
                          ?>
                </td>
              </tr>
              <?php $x++;} ?>
            </tbody>
            <?php endif; ?>
          </table>
          <div class="dataTables_info"></div>
          <div class="dataTables_paginate paging_full_numbers">
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
